package org.mozhu.mboot.admin.maintain.i18n.web.controller;

import org.mozhu.mboot.core.web.bind.annotation.ControllerDefaults;
import org.mozhu.mboot.core.web.controller.BaseCRUDController;
import org.mozhu.mboot.admin.maintain.i18n.entity.I18NResource;
import org.mozhu.mboot.admin.maintain.i18n.entity.LocaleType;
import org.mozhu.mboot.admin.maintain.i18n.service.I18NResourceService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * I18N - 控制层
 * 
 * @author ZhangPei
 */
@Controller
@RequestMapping("/maintain/i18n/resource")
@ControllerDefaults(resourceIdentity = "maintain:i18nResource")
public class I18nResourceController extends BaseCRUDController<I18NResource, Long> {

	protected I18NResourceService getBaseService() {
		return (I18NResourceService) baseService;
	}

	@Override
	protected void setCommonData(Model model) {
		super.setCommonData(model);
		model.addAttribute("types", LocaleType.values());
	}

}